import request from '@/utils/request'

const api_name = '/eduCms/bannerAdmin'

// 后台管理控制层
export default {

    //banner分页查询
    bannerPageList(page, limit, queryBannerDto) {
        return request({
            url: `${api_name}/${page}/${limit}`,
            method: 'post',
            data: queryBannerDto
        })
    },
    //根据id查询banner
    getBannerById(id) {
        return request({
            url: `${api_name}/getBannerById/${id}`,
            method: 'get'
        })
    },
    // 添加banner
    saveBanner(crmBanner) {
        return request({
            url: `${api_name}/saveBanner`,
            method: 'post',
            data: crmBanner
        })
    },
    // 修改banner
    updateBanner(crmBanner) {
        return request({
            url: `${api_name}/updateBanner`,
            method: 'post',
            data: crmBanner
        })
    },
    // 删除banner
    deleteBannerById(id) {
        return request({
            url: `${api_name}/deleteBannerById/${id}`,
            method: 'delete'
        })
    }

}